import { defineStore } from 'pinia'
// 定义整个项目属性
export const useAppStore = defineStore('appStore', {
	state: () => ({
		// 国际化
		language: 'zh-CN',
		// 组件大小
		componentSize: 'small'
	}),
	actions: {
		setLanguage(locale: string) {
			this.language = locale
		},
		setComponentSize(size: string) {
			this.componentSize = size
		}
	},
    persist: {
        key: 'counterStore',
        storage: localStorage
    }
})
